import pygame
# To change this template, choose Tools | Templates
# and open the template in the editor.

__author__="james"
__date__ ="$27/04/2011 7:36:10 PM$"

from pygame.sprite import Sprite

class Actor(Sprite):
    health = 100
    death_length = 5
    dead = False
    def __init__(self,stage):
        Sprite.__init__(self)
        self.stage = stage
        self.draw_actor()
        pass

    def get_weapon(self,weapon):
        self.weapon = weapon
        self.weapon.set_player(self)
        pass

    def draw_actor(self):
        pass

    def set_postion(self,position):
        self.rect.midtop = position

    def fire(self):
        self.weapon.fire()
        pass

    def take_hit(self, damage):
        self.health = self.health - damage
        if self.health <= 0:
            self.die()

    def die(self):
        self.kill()